package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IShippingAddressActivityModel;
import com.wgts.wgts.mvp.model.imp.ShippingAddressActivityModel;
import com.wgts.wgts.mvp.presenter.IShippingAddressActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.ShippingAddressActivityPresenter;
import com.wgts.wgts.mvp.view.IShippingAddressActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/49:19
 *
 */
@Module
public class ShippingAddressActivityModule {
    private IShippingAddressActivityView view;

    public ShippingAddressActivityModule(IShippingAddressActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IShippingAddressActivityView ProvideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IShippingAddressActivityModel provideModel(NetService netService){
        return new ShippingAddressActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IShippingAddressActivityPresenter providePresenter(IShippingAddressActivityView view, IShippingAddressActivityModel model){
        return new ShippingAddressActivityPresenter(view, model);
    }
}
